import Vue from 'vue';
import Vuex from 'vuex';
import axios from 'axios'
Vue.prototype.$http=axios;
let That=new Vue();

Vue.use(Vuex);
const state = {
	tableData:[],
	loading:true
}
const mutations = { //computed

	getUser(state){
		state.loading=true;
		That.$http.post("/api/user/selectStudent").then((res)=>{
			state.loading=false;
			state.tableData=res.data;
		})
	}
}

export default new Vuex.Store({
	state,
	mutations
})